#!/usr/bin/env python
PACKAGE = "edvo"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

# mode_enum = gen.enum([ gen.const("AUTO", int_t, 0, "Automatic mode"), 
# 					   gen.const("MANUAL", int_t, 1, "Manual mode"), 
# 					   gen.const("ONE_PUSH_AUTO", int_t, 2, "One Push Automatic mode"), 
# 					   ],
# 					   "An enum to set feature modes")

# general params
gen.add("depth_to_meter", double_t, 0, "Number of depth pixel units per meter", 1000, 1, 10000 )
gen.add("pyramid_octaves", int_t, 0, "Num. of octaves for each reference", 3, 1, 7 )
gen.add("pyramid_scale", double_t, 0, "Pyramid scale factor", 0.6, 0.4, 0.99 )

# reference auto update thresholds
gen.add("ref_upd_max_rot_dist", double_t, 0, "Max. rotational distance in degree w.r.t. reference before updating", 3.0, 0.0, 20 )
gen.add("ref_upd_max_t_dist", double_t, 0, "Max. translational distance in meter w.r.t. reference before updating", 0.4, 0.0, 5.0 )
gen.add("ref_upd_max_ssd", double_t, 0, "Max. SSD to maintain reference", 0.15, 0.0, 1.0 )
gen.add("ref_upd_min_pix_perc", double_t, 0, "Minimum pixel percentage to maintain reference", 0.8, 0.2, 1.0 )

# reference update parameters
gen.add("gradient_threshold", double_t, 0, "Gradient Saliency to consider", 0.05, 0.0, 0.2 )
gen.add("reference_max_depth", double_t, 0, "Max Depth w.r.t. current reference ", 10.0, 0.1, 15.0 )
gen.add("reference_min_depth", double_t, 0, "Min Depth w.r.t. current reference ", 0.1, 0.0, 5.0 )
gen.add("use_info_select", bool_t, 0, "Use information selection", False )
gen.add("information_selection_thresh", double_t, 0, "Percentag of pixels to select", 0.1, 0.01, 1.0 )

# optimizer params
gen.add("optimizer_iterations", int_t, 0, "Iterations (per octave) of optimizer", 10, 1, 40 )
gen.add("optimizer_cost_stop", double_t, 0, "optimizer cost stop threhold", 0.001, 0.0001, 0.05 )
gen.add("optimizer_min_p_upd", double_t, 0, "min. update step in optimizer", 0.00001, 0.000001, 0.05 )
gen.add("optimizer_use_regularizer", bool_t, 0, "Use regularization term", False )
gen.add("optimizer_reg_alpha", double_t, 0, "influence of the regularization", 0.5, 0.0, 5.0 )

gen.add("reset", bool_t, 0, "Reset VO System for reinit", False )

exit(gen.generate(PACKAGE, "edvo", "EDVO"))
